<?php
$orderTicket = OrderTickets::model()->findByAttributes(array('order_id'=>$model->id));
$event = Events::model()->findByPk($orderTicket->ticket_id) ;
$title = $event->title;
$getTicket = $event->getTicket();

$this->breadcrumbs=array(
	'Thông tin đặt vé sự kiện: ' .$title ,
);
?>
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'event-form',
	'enableClientValidation'=>false,
	'clientOptions'=>array(
		'validateOnSubmit'=>false,
	),
	'htmlOptions'=>array(
		'class'=>'',
	),
)); ?>
<fieldset>
    <legend>Thông tin sự kiện</legend>
    <!-- Order info -->
    <div class="form-group">
        <label class="col-xs-2 text-right">Tên sự kiện:</label>
        <div class="col-xs-10">
            <strong><?php echo $title; ?></strong>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 text-right">Loại sự kiện:</label>
        <div class="col-xs-10">
            <strong><?php echo $getTicket; ?></strong>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 text-right">Vé sự kiện:</label>
        <div class="col-xs-10">
            <!-- Event Ticket -->
            <div class="event-tickets">
                <strong>Liên hệ</strong>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 text-right">Trạng thái:</label>
        <div class="col-xs-10">
            <strong class="text-success"><?php echo $model->getStatus(); ?></strong>
        </div>
    </div>
</fieldset>
<fieldset>
    <legend>Thông tin người mua</legend>
    <!-- Order Buyer -->
    <div class="form-group">
        <?php echo $form->labelEx($model->buyer, 'lname', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-5">
            <?php echo $form->textField($model->buyer, 'lname', array('class'=>'form-control input-sm', 'placeholder'=>'Họ và tên đệm', 'disabled'=>'disabled')); ?>
        </div>
        <div class="col-xs-5">
            <?php echo $form->textField($model->buyer, 'fname', array('class'=>'form-control input-sm', 'placeholder'=>'Tên', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model->buyer, 'email', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-10">
            <?php echo $form->textField($model->buyer, 'email', array('class'=>'form-control input-sm', 'placeholder'=>'Địa chỉ Email', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model->buyer, 'phone', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-5">
            <?php echo $form->textField($model->buyer, 'phone', array('class'=>'form-control input-sm', 'placeholder'=>'Số điện thoại', 'disabled'=>'disabled')); ?>
        </div>
        <div class="col-xs-5">
            <?php echo $form->textField($model->buyer, 'altphone', array('class'=>'form-control input-sm', 'placeholder'=>'Số điện thoại khác', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model->buyer, 'address', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-10">
            <?php echo $form->textField($model->buyer, 'address', array('class'=>'form-control input-sm', 'placeholder'=>'Địa chỉ', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-5 col-xs-offset-2">
            <?php echo $form->textField($model->buyer, 'ward', array('class'=>'form-control input-sm', 'placeholder'=>'Phường/Xã', 'disabled'=>'disabled')); ?>
        </div>
        <div class="col-xs-5">
            <?php echo $form->textField($model->buyer, 'district', array('class'=>'form-control input-sm', 'placeholder'=>'Quận/Huyện', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-5 col-xs-offset-2">
            <?php echo $form->textField($model->buyer, 'city', array('class'=>'form-control input-sm', 'placeholder'=>'Tỉnh/Thành phố', 'disabled'=>'disabled')); ?>
        </div>
        <div class="col-xs-5">
            <?php echo $form->textField($model->buyer, 'country', array('class'=>'form-control input-sm', 'placeholder'=>'Quốc gia', 'disabled'=>'disabled')); ?>
        </div>
    </div>
</fieldset>
<fieldset>
    <legend>Thông tin người nhận</legend>
    <!-- Order Buyer -->
    <div class="form-group">
        <?php echo $form->labelEx($model->receiver, 'lname', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-5">
            <?php echo $form->textField($model->receiver, 'lname', array('class'=>'form-control input-sm', 'placeholder'=>'Họ và tên đệm', 'disabled'=>'disabled')); ?>
        </div>
        <div class="col-xs-5">
            <?php echo $form->textField($model->receiver, 'fname', array('class'=>'form-control input-sm', 'placeholder'=>'Tên', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model->receiver, 'email', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-10">
            <?php echo $form->textField($model->receiver, 'email', array('class'=>'form-control input-sm', 'placeholder'=>'Địa chỉ Email', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model->receiver, 'phone', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-5">
            <?php echo $form->textField($model->receiver, 'phone', array('class'=>'form-control input-sm', 'placeholder'=>'Số điện thoại', 'disabled'=>'disabled')); ?>
        </div>
        <div class="col-xs-5">
            <?php echo $form->textField($model->receiver, 'altphone', array('class'=>'form-control input-sm', 'placeholder'=>'Số điện thoại khác', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model->receiver, 'address', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-10">
            <?php echo $form->textField($model->receiver, 'address', array('class'=>'form-control input-sm', 'placeholder'=>'Địa chỉ', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-5 col-xs-offset-2">
            <?php echo $form->textField($model->receiver, 'ward', array('class'=>'form-control input-sm', 'placeholder'=>'Phường/Xã', 'disabled'=>'disabled')); ?>
        </div>
        <div class="col-xs-5">
            <?php echo $form->textField($model->receiver, 'district', array('class'=>'form-control input-sm', 'placeholder'=>'Quận/Huyện', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-5 col-xs-offset-2">
            <?php echo $form->textField($model->receiver, 'city', array('class'=>'form-control input-sm', 'placeholder'=>'Tỉnh/Thành phố', 'disabled'=>'disabled')); ?>
        </div>
        <div class="col-xs-5">
            <?php echo $form->textField($model->receiver, 'country', array('class'=>'form-control input-sm', 'placeholder'=>'Quốc gia', 'disabled'=>'disabled')); ?>
        </div>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model->receiver, 'note', array('class'=>'control-label col-xs-2')); ?>
        <div class="col-xs-10">
            <?php echo $form->textArea($model->receiver, 'note', array('class'=>'form-control input-sm', 'placeholder'=>'Ghi chú đặt vé', 'rows'=>5, 'disabled'=>'disabled')); ?>
        </div>
    </div>
</fieldset>
<?php $this->endWidget(); ?>